package com.tzx.fluttermixedapplication.activity

import android.content.Intent
import android.os.Bundle
import android.widget.Button
import android.widget.LinearLayout
import com.tzx.base.base.BaseActivity
import com.tzx.base.base.BaseViewModel
import com.tzx.base.utils.createViewModels
import com.tzx.fluttermixedapplication.R


class MainActivity : BaseActivity() {
    private lateinit var container: LinearLayout
    private lateinit var button: Button

    private val viewModel: BaseViewModel by createViewModels { this }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main_layout)
        container = findViewById(R.id.root)
        button = findViewById(R.id.button)
        button.setOnClickListener {
            // startActivity(
            //     FlutterFragmentActivity.NewEngineIntentBuilder(
            //         BaseFlutterFragmentActivity::class.java
            //     ).initialRoute("page form MainActivity~!")
            //         .build(this@MainActivity)
            // )
            startActivity(Intent(this@MainActivity, ViewModelTestActivity::class.java))
        }
    }
}